package org.xu.logic;

import com.core.base.Reply;
import com.core.utils.UUIDGenerator;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.xu.dto.WorkFlowLogDTO;
import org.xu.entity.WorkFlowLogEntity;
import org.xu.request.WorkLogRequest;
import org.xu.request.WorkPageRequest;
import org.xu.service.WorkFlowLogService;

import java.util.List;

/**
 * @author liuxiaoxu
 */
@Slf4j
@Service
public class WorkFlowLogicImpl implements WorkFlowLogic{

    @Autowired
    private WorkFlowLogService logService;
    @Override
    public List<WorkFlowLogEntity> list() {
        return null;
    }

    @Override
    public Reply<List<WorkFlowLogEntity>> lockGet() {
        return null;
    }

    @Override
    public List<WorkFlowLogDTO> query(WorkLogRequest request) {
        return null;
    }

    @Override
    public PageInfo<WorkFlowLogDTO> pageQuery(WorkPageRequest request) {
        return null;
    }

    @Override
    public int insert(WorkFlowLogEntity record) {
        return logService.insert(record);
    }

    @Transactional
    @Override
    public void logTest() {
        WorkFlowLogEntity record = new WorkFlowLogEntity();
        record.setId(UUIDGenerator.generate());
        record.setApplyNo("123456");
        record.setRemark("测试事务");
        insert(record);
      //  int b = 1 / 0;
    }

}
